From 4e2b530c51887535c19dd4fd64e51c188e858337 Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Tue, 12 Jul 2005 10:01:03 +0000 Subject: [PATCH] Add xc_init_store and run xenbus probe on INITDOMAIN_STORE privcmd ioctl. Signed-off-by: Rusty Russel Signed-off-by: Christian Limpach --- linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c | 3 ++- tools/libxc/xc.h | 9 +++++++++ tools/libxc/xc_misc.c | 5 +++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c index 9eea1835b5..50c8de3eae 100644 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -222,7 +223,7 @@ static int privcmd_ioctl(struct inode *inode, struct file *file, PAGE_SHIFT); /* We'll return then this will wait for daemon to answer */ - // kthread_run(do_xenbus_probe, NULL, "xenbus_probe"); + kthread_run(do_xenbus_probe, NULL, "xenbus_probe"); } break; diff --git a/tools/libxc/xc.h b/tools/libxc/xc.h index 073f6562c0..97310a21f8 100644 --- a/tools/libxc/xc.h +++ b/tools/libxc/xc.h @@ -524,4 +524,13 @@ long xc_get_tot_pages(int xc_handle, u32 domid); /* Execute a privileged dom0 operation. */ int xc_dom0_op(int xc_handle, dom0_op_t *op); +/* Initializes the store (for dom0) + remote_port should be the remote end of a bound interdomain channel between + the store and dom0. + + This function returns a shared frame that should be passed to + xs_introduce_domain + */ +long xc_init_store(int xc_handle, int remote_port); + #endif /* __XC_H__ */ diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c index ac306b1585..7e4c10d155 100644 --- a/tools/libxc/xc_misc.c +++ b/tools/libxc/xc_misc.c @@ -130,3 +130,8 @@ int xc_msr_write(int xc_handle, int cpu_mask, int msr, unsigned int low, return rc; } + +long xc_init_store(int xc_handle, int remote_port) +{ + return ioctl(xc_handle, IOCTL_PRIVCMD_INITDOMAIN_STORE, remote_port); +} -- 2.30.2